<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
<h:body >
<iframe id="frmClaro" src="about:blank" width="0" height="0"></iframe>
	<div class="ui-widget ui-widget-header">
		<h:panelGrid columns="2" style="margin:auto;">
			<h1>Contact Center</h1>

			<p:ajaxStatus style="width:16px;height:16px;" id="ajaxStatusPanel">
				<f:facet name="start">
					<p:outputLabel value="cargando..." />
					<h:graphicImage value="/resources/img/mailloader.gif" />
				</f:facet>

				<f:facet name="complete">
					<p:outputLabel value="" />
				</f:facet>

				<f:facet name="error">

					<p:outputLabel value="Error.." />
				</f:facet>
			</p:ajaxStatus>
		</h:panelGrid>
	</div>

	<h:form id="formHeader">

		<p:menubar
			rendered="#{sessionBean.agentId!=null or sessionBean.supervisorId!=null or sessionBean.adminId!=null}"
			styleClass="centeredMenuBar">
			<p:menuitem value="Inicio" outcome="/ccenter.xhtml"
				icon="ui-icon-home" />

			<p:menuitem rendered="#{sessionBean.agentId!=null}" value="Panel"
				outcome="/agent_panel.xhtml" icon="ui-icon-star" />
			<p:menuitem rendered="#{sessionBean.agentId!=null}" value="Sesiones"
				outcome="/search_agent_session.xhtml" icon="ui-icon-star" />
			<p:menuitem rendered="#{sessionBean.supervisorId!=null}"
				value="Sesiones" outcome="/search_supervisor_session.xhtml"
				icon="ui-icon-star" />
			<p:menuitem rendered="#{sessionBean.supervisorId!=null}"
				value="Agentes" outcome="/search_agent.xhtml" icon="ui-icon-star" />

			<f:facet name="options">

				<p:commandButton value="Salir" action="#{loginController.doLogout}"
					icon="ui-icon-extlink" />

				<p:poll interval="60" 
					listener="#{agentPanelController.updateStatus}"
					update="growl_header" />

				<p:growl id="growl_header"></p:growl>
				
				<h:inputHidden id="hiddAgentId" value="#{sessionBean.agentId}"></h:inputHidden>
				
				
				
			</f:facet>

		</p:menubar>




	</h:form>




</h:body>
</html>
